<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>轩盛金融</title>
    <meta name="keywords" content="轩盛金融">
    <meta name="description" content="轩盛金融">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="__CSS__/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__CSS__/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__CSS__/animate.min.css" rel="stylesheet">
    <link href="__CSS__/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="__JS__/layui/css/layui.css"rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>VIP订单</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link" href="{:url('Ad/home')}">
                                <i class="fa fa-reply"></i>
                            </a>

                        </div>
                    </div>
                    <div class="ibox-content">
                        <form method="post" action="{:url('order/arr')}" class="form-horizontal layui-form" enctype="multipart/form-data">
                            <div class="form-group">
                                <label for="ad_name" class="col-sm-3 control-label">业务员</label>

                                <div class="col-sm-6">
                                    <input required="required" type="text" lay-verify="required" id="user" name="user" class="form-control layui-input" value="{$arr.vip_user}" placeholder="业务员">
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="media_type" class="col-sm-3 control-label">客户姓名</label>

                                <div class="col-sm-6">
                                    <input required="required" type="text" lay-verify="required" id="ad_name" name="ad_name" class="form-control layui-input" value="{$arr.userName}" placeholder="客户姓名">
                                </div>
                            </div>
                            
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="pid" class="col-sm-3 control-label">客户基本情况</label>

                                <div class="col-sm-6">
                                    <input required="required" type="text" lay-verify="required" id="userSituation" name="userSituation" class="form-control" value="{$arr.vip_userSituation}" placeholder="客户基本情况">
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="pid" class="col-sm-3 control-label">手机号码</label>

                                <div class="col-sm-6">
                                    <input required="required" type="text" lay-verify="required" id="phone" name="phone" class="form-control" value="{$arr.mobile}" placeholder="手机号码">
                                </div>
                            </div>


                    <!--         <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="ad_pic" class="col-sm-3 control-label">广告图片</label>

                                <div class="col-sm-6">
                                    <input required="required" type="file" lay-verify="required" id="ad_pic" name="ad_pic" class="form-control" accept="image/*">
                                </div>
                            </div> -->
                            

                            

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="pid" class="col-sm-3 control-label">信用卡总额度</label>

                                <div class="col-sm-6">
                                    <input required="required" type="text" lay-verify="required" id="CreditCard" name="CreditCard" class="form-control" value="{$arr.vip_CreditCard}" placeholder="信用卡总额度">
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="pid" class="col-sm-3 control-label">已用额度</label>

                                <div class="col-sm-6">
                                    <input required="required" type="text" lay-verify="required" id="Amountused" name="Amountused" class="form-control" value="{$arr.vip_Amountused}" placeholder="已用额度">
                                </div>
                            </div>
 <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="pid" class="col-sm-3 control-label">在还贷款金额</label>

                                <div class="col-sm-6">
                                    <input required="required" type="text" lay-verify="required" id="CreditCard" name="CreditCard" class="form-control" value="{$arr.vip_amountonloan}" placeholder="在还贷款金额">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="pid" class="col-sm-3 control-label">在还贷款月还</label>

                                <div class="col-sm-6">
                                    <input required="required" type="text" lay-verify="required" id="Loan" name="Loan" class="form-control" value="{$arr.vip_Loan}" placeholder="贷款月还">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="pid" class="col-sm-3 control-label">需要贷款金额</label>

                                <div class="col-sm-6">
                                    <div class="input-group m-b">
                                        <input required="required" type="text" lay-verify="required" id="money" name="money" class="form-control" value="{$arr.needToLoanMoney}" placeholder="贷款金额"><span class="input-group-addon">万</span>
                                    </div>
                                </div>
                            </div>
                            <!-- type 类型 -->
                            <input type="hidden" id="niubi" name="order_sn"value="{$arr.order_sn}"  >
                            
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-2 col-sm-offset-5">

                               {if condition="$arr.order_status eq 0 "}
                                
                                <button class="btn btn-info btn-block text-center" id="Choose-goods" name="Qualifications" value="{$arr.order_sn}" style="width: 100px;position: absolute;left: 50%;" onclick="Choose(this)" type="button">挑选方案</button>

                               
                                 {/if}

                                {if condition="$arr.order_status egt 3 "}
    
                                <button class="btn btn-info btn-block text-center" id="Choose-goods" name="Qualifications" value="{$arr.order_sn}"  onclick="final(this)" type="button">跳转方案</button>

                                <button class="btn btn-info btn-block text-center" id="Choose-goods" name="Qualifications" value="{$arr.order_sn}"  onclick="why(this)" type="button">不挑选的产品</button>

                            {/if}

                                </div>
                            </div>

                            <div style="height: 50px"></div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


        <form id="OrderSn" action="orderGoodsinfo" method="GET">
            <input type="hidden" name="order_sn" value="{$arr.order_sn}">
        </form>

    <script src="__JS__/jquery.min.js?v=2.1.4"></script>
    <script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
    <script src="__JS__/layui/layui.js"></script>
    <script>
        // 引用layui
        layui.use(['layer', 'form'], function(){
          var layer = layui.layer;
          var form = layui.form;
        });

          function requestAjax(requestType,requestUrl,requestData,requestCT){
            this.requestType = requestType;
            this.requestUrl = requestUrl;
            this.requestData = requestData;
            this.requestContentType = requestCT
        }
        requestAjax.prototype.ajax = function(callBack){
            $.ajax({
                type: this.requestType,
                contentType:this.requestContentType,
                dataType: "json",//预期服务器返回的数据类型
                url: this.requestUrl ,
                data: this.requestData,
                success: function (data) {
                    // ajax 成功方法
                    callBack(data);
                }
            })
        }


            // 跳转挑选
        function Choose(e){

        $('#OrderSn').submit();

         var niubi = $("#niubi").val();

           
            
            var goods = $(`#Choose-goods`).val();




            var removeClassfiy = new requestAjax('get','orderGoodsinfo', 'id='+niubi,'application/json; charset=utf-8');


            removeClassfiy.ajax(function(data){

                // console.log(data)

               
            })

        }


                // 跳转最终
        function final(e){

        
           
            var niubi = $("#niubi").val();

            // console.log(niubi);

       

             $.ajax({

                    type:"post",

                    url:"ajaxZizhi2",

                    data:{

                        'order_sn':niubi,
                    },
                    success:function(data){

                        // console.log(data);
                        // console.log(typeof data);
                        // 带订单号跳转最终页面
                        window.location.href='{:url('order/schemeinfo')}?order='+data;

                    },

                    async:true

                });  

        }




                // 跳转不挑选
        function why(e){

        
           
            var niubi = $("#niubi").val();

             $.ajax({

                    type:"post",

                    url:"nolist",

                    data:{

                        'order_sn':niubi,
                    },
                    success:function(data){

                        // console.log(data);
                        // console.log(typeof data);
                        // 带订单号跳转最终页面
                        window.location.href='{:url('order/orderwhy')}?order='+niubi;

                    },

                    async:true

                });  

        }
    </script>
</body>

</html>
